<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- Bootstrap CSS-->
    <%@include file="../assets/public.jsp"%>
    <title>部门</title>

</head>
<body>
<%@include file="../assets/header.jsp"%>

<div class="d-flex align-items-stretch">
    <!-- Sidebar Navigation-->
    <%@include file="../assets/sidebar.jsp"%>
    <!-- Sidebar Navigation end-->
    <div class="page-content">
        <div class="page-header">
            <div class="container-fluid">
                <h2 class="h5 no-margin-bottom">全部部门</h2>
            </div>
        </div>
        <section class="no-padding-bottom">

            <div class="list-group subject">
                <c:forEach items="${sessionScope.depts}" var="dept">
                    <div class="list-group-item">
                        <a href="#deptDetail1${dept.deptId}" data-toggle="collapse">${dept.deptName} &nbsp;${dept.count}</a>
                        <div id="deptDetail1${dept.deptId}" class="collapse deptDetail">
                            <ul>
                                <c:forEach items="${dept.userList}" var="user">
                                    <li>
                                        <c:if test="${user.realName == ''||user.realName == null}">
                                            <a href="#">${user.username}</a>
                                        </c:if>
                                        <c:if test="${user.realName != ''&&user.realName != null}">
                                            <a href="#">${user.realName}</a>
                                        </c:if>
                                    </li>
                                </c:forEach>
                            </ul>
                        </div>
                    </div>
                </c:forEach>
            </div>
        </section>
        <%@include file="../assets/footer.jsp"%>
    </div>
</div>

</body>
</html>